<template>
  <div>
    <p v-if="taskArray.length==0">没有找到合适的数据/今日任务未指定</p>
    <ul class="todo-main " v-else>
     <task-item v-for="(task,index) in  taskArray" :key="index" 
     :taskObj="task" :updateTaskDone="updateTaskDone"
     :deleteTaskId='deleteTaskId'></task-item>
    </ul>
       
  </div>        
</template>

<script>
import TaskItem from './TaskItem.vue'
export default { 
  name: "TaskList",
  components:{
   TaskItem,
  },
 props:['taskArray','updateTaskDone','deleteTaskId']
};
</script>

<style  scoped>
    .todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
p{
  color: red;
  text-align: center;
}
</style>